package org.jeecg.modules.innerApi.zhiYunSdApi.requestVo;

import lombok.Data;

import java.io.Serializable;

/**
 * 全电蓝票开具接口入参发票明细信息
 */
@Data
public class SdQdlpkjjkFyxm implements Serializable {
    /**发票行性质*/
    private String fphxz;
    /**
     * 发票行性质枚举
     */
    public static enum fphxzEnum {
        zch ("正常行","0"),
        zkh ("折扣行","1"),
        bzkh ("被折扣行","2");
        private final String desc;//描述
        private final String value;//值
        fphxzEnum (String desc, String value) {
            this.desc = desc;
            this.value = value;
        }
    }
    /**商品名称*/
    private String spmc;
    /**商品税目*/
    //private String spsm;
    /**规格型号*/
    private String ggxh;
    /**单位*/
    private String dw;
    /**商品数量*/
    private String spsl;
    /**单价*/
    private String dj;
    /**金额*/
    private String je;
    /**税率*/
    private String sl;
    /**税额*/
    private String se;
    /** 含税标志1 含税 0 不含税*/
    private String hsbz;
    /**
     * 含税标志枚举
     */
    public static enum hsbzEnum {
        bhs ("不含税","0"),
        hs ("含税","1")
        ;
        private final String desc;//描述
        private final String value;//值
        hsbzEnum (String desc, String value) {
            this.desc = desc;
            this.value = value;
        }
    }
    /**商品编码*/
    private String spbm;
    /**自行编码*/
   // private String zxbm;
    /**优惠政策标识 1使用优惠政策 0不使用*/
    private String yhzcbs;
    /**
     * 优惠政策标识枚举
     */
    public static enum yhzcbsEnum {
        bsy ("不使用","0"),
        syyhzc ("使用优惠政策","1");
        private final String desc;//描述
        private final String value;//值
        yhzcbsEnum (String desc, String value) {
            this.desc = desc;
            this.value = value;
        }
    }
    /**零税率类标识*/
    private String lslbs;
    /**
     * 零税率类标识枚举
     */
    public static enum lslbsEnum {
        zcsl ("正常税率","0"),
        ckms ("出口免税和其他免税优惠政策（免税）","1"),
        bzzzs ("不征增值税（不征税）","2"),
        ptlsl ("普通零税率（0%）","3")
        ;
        private final String desc;//描述
        private final String value;//值
        lslbsEnum (String desc, String value) {
            this.desc = desc;
            this.value = value;
        }
    }
    /**增值税特殊管理*/
    /**
     * 1.不征税
     * 2.50%先征后退
     * 3.稀土产品
     * 4.按5%简易fangshi3
     * 减按1.5%计征
     * 5.先征后退
     * 6.按5%简易征收
     * 7.简易征收
     * 8.即征即退70%
     * 9.免税
     * 10.按3%简易征收
     * 11.超税负3%即征即退
     * 12.超税负12%即征即退
     * 13.即征即退30%
     * 14.超税负8%即征即退
     * 15.100%先征后退
     * 16.即征即退50%
     * 17.即征即退100%
     */
    private String zzstsgl;

    /**
     * 增值税特殊管理枚举
     */
    public static enum zzstsglEnum {
        jxzs ("简易征收","7"),
        xtcp ("稀土产品","3"),
        ms ("免税","9"),
        bzs ("不征税","1"),
        xzht ("先征后退","5"),
        xzht_100 ("100%先征后退","15"),
        xzht_50 ("50%先征后退","2"),
        jyzs_3 ("按3%简易征收","10"),
        jyzs_5 ("按5%简易征收","4"),
        jyzs_5_ja15jz ("按5%简易征收减按1.5%计征","18"),
        jzjt_30 ("即征即退30%","13"),
        jzjt_50 ("即征即退50%","16"),
        jzjt_70 ("即征即退70%","8"),
        jzjt_100 ("即征即退100%","17"),
        csf_3_jzjt ("超税负3%即征即退","11"),
        csf_8_jzjt ("超税负8%即征即退","14"),
        csf_12_jzjt ("超税负12%即征即退","12"),
        csf_6_jzjt ("超税负6%即征即退","19"),

        ;
        private final String desc;//描述
        private final String value;//值
        zzstsglEnum (String desc, String value) {
            this.desc = desc;
            this.value = value;
        }

        public String getDesc() {
            return desc;
        }

        public String getValue() {
            return value;
        }

        public static String getDescByValue(String value) {
            for(zzstsglEnum zzstsglEnum : zzstsglEnum.values()){
                if(zzstsglEnum.getValue().equalsIgnoreCase(value)){
                   return zzstsglEnum.getDesc();
                }
            }
            return null;
        }
    }
}
